﻿namespace Common.Abstraction;

public class SortObject
{
    public string Field { get; set; }
    public SortDirection Direction { get; set; }

    public static SortObject OrderByDesc(string field)
    {
        return new SortObject() { Field = field, Direction = SortDirection.Desc };
    }
    
    public static SortObject OrderByAsc(string field)
    {
        return new SortObject() { Field = field, Direction = SortDirection.Asc };
    }
}

public enum SortDirection : byte
{
    Desc,
    Asc
}